import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    {
      path: "/",
      redirect: "/search",
    },
    {
      path: "/register",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "注册",
      },
      component: () => import("../pages/register"),
    },
    {
      path: "/login",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "登录",
      },
      component: () => import("../pages/login"),
    },
    {
      path: "/home",
      name: "Home",
      meta: {
        showFooter: true,
        musicplaying: true,
        title: "首页",
      },
      component: () => import("../pages/home"), // 路由懒加载
    },
    {
      path: "/songsheet",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "歌单列表",
      },
      component: () => import("../pages/songsheet"), // 路由懒加载
    },
    {
      path: "/yuncun",
      name: "Yuncun",
      meta: {
        showFooter: true,
        musicplaying: true,
        title: "云村",
      },
      component: () => import("../pages/yuncun"), // 路由懒加载
    },
    {
      path: "/videopage/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "视频页",
      },
      component: () => import("../pages/videopage"), // 路由懒加载
    },
    {
      path: "/playpage",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "播放页",
      },
      component: () => import("../pages/playpage"), // 路由懒加载
    },
    {
      path: "/playpage/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "播放页带id",
      },
      component: () => import("../pages/playpage"), // 路由懒加载
    },
    {
      path: "/search",
      name: "Search",
      meta: {
        showFooter: true,
        musicplaying: true,
        title: "发现",
      },
      component: () => import("../pages/search"), // 路由懒加载
    },
    {
      path: "/follow/",
      name: "Follow",
      meta: {
        showFooter: true,
        musicplaying: true,
        title: "关注",
      },
      component: () => import("../pages/follow"), // 路由懒加载
    },
    {
      path: "/mvmusic/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "MV页面",
      },
      component: () => import("../pages/mvmusic"), // 路由懒加载
    },
    {
      path: "/recentlyplayed",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "最近播放",
      },
      component: () => import("../pages/recentlyplayed"), // 路由懒加载
    },
    {
      path: "/localdownload",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "本地下载",
      },
      component: () => import("../pages/localdownload"), // 路由懒加载
    },
    {
      path: "/songlist/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "歌单",
      },
      component: () => import("../pages/songlist"), // 路由懒加载
    },
    {
      path: "/daily",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "每日推荐",
      },
      component: () => import("../pages/daily"), // 路由懒加载
    },
    {
      path: "/allfriends",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "全部好友",
      },
      component: () => import("../pages/allfriends"), // 路由懒加载
    },
    {
      path: "/podcast",
      name: "Podcast",
      meta: {
        showFooter: true,
        musicplaying: true,
        title: "播客",
      },
      component: () => import("../pages/podcast"), // 路由懒加载
    },
    {
      path: "/songlistdetails/:id",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "歌单详情",
      },
      component: () => import("../pages/songlistdetails"), // 路由懒加载
    },
    {
      path: "/gedansquare",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "歌单广场",
      },
      component: () => import("../pages/gedansquare"), // 路由懒加载
    },

    {
      path: "/singerhomepage/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "歌手主页",
      },
      component: () => import("../pages/singerhomepage"), // 路由懒加载
    },
    {
      path: "/singersong/:id",
      meta: {
        showFooter: true,
        musicplaying: false,
        title: "歌手歌单",
      },
      component: () => import("../pages/singersong"), // 路由懒加载
    },
    {
      path: "/singerBD/:id",
      meta: {
        showFooter: false,
        musicplaying: false,
        title: "艺人百科",
      },
      component: () => import("../pages/singerBD"), // 路由懒加载
    },
    {
      path: "/rankinglist",
      meta: {
        showFooter: false,
        musicplaying: true,
        title: "排行榜",
      },
      component: () => import("../pages/rankinglist"), // 路由懒加载
    },
  ],
});

export default router;
